import request from '@/utils/request.js'


export function getCommunityInfo(data) {
	
	return request({
		url: '/community/getCommunityInfo',
		method: 'GET',
		data: data
	})
}

export function selectCommentsBymesId(data) {
	
	return request({
		url: '/community/selectCommentsBymesId',
		method: 'GET',
		data: data
	})
}

export function insertCommentByMesId(data) {
	
	return request({
		url: '/community/insertCommentByMesId',
		method: 'POST',
		data: data
	})
}

export function userLikeCommunityCommon(data) {
	
	return request({
		url: '/community/userLikeCommunityCommon',
		method: 'POST',
		data: data
	})
}

export function queryUserList(data) {
	
	return request({
		url: '/community/queryUserList',
		method: 'GET',
		data: data
	})
}

export function acceptTheDynamics(data) {
	
	return request({
		url: '/community/acceptTheDynamics',
		method: 'POST',
		data: data
	})
}

export function uploadImage(file) {
  const formData = new FormData();
  formData.append('file', file);
  return request({
    url: '/api/community/uploadImage',
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}
